<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>事故备案</title>
    <link rel="stylesheet" href="/static/js/plugins/jquery-easyui/themes/metro/easyui.css">
    <link rel="stylesheet" href="/static/js/plugins/jquery-easyui/themes/icon.css">
    <script src="/static/js/plugins/jquery-easyui/jquery.min.js"></script>
    <script src="/static/js/plugins/jquery-easyui/jquery.easyui.min.js"></script>
    <script src="/static/js/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="/static/js/system/employee.js"></script>
</head>
<body>
<table id="emp_datagrid"></table>
<%--为数据表格添加顶部按钮组件--%>
<%--为按钮绑定方法--%>
<div id="tb">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="add()">添加</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" id="change_btn" onclick="changeState()">离职</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="edit()">编辑</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="reload()">刷新</a>

    <%--高级查询的输入框--%>
    <input class="easyui-textbox" type="text" id="keywords" name="keywords" prompt="请输入用户名 / 邮箱">
    入职日期:<input class="easyui-datebox" type="text" id="beginDate" name="beginDate">~
    <input class="easyui-datebox" type="text" id="endDate" name="endDate">
    <!--添加一个高级查询按钮-->
    部门:<input class="easyui-combobox" type="text" name="deptId" id="deptId"
           data-options="url:'/department/queryDepts',valueField:'id', textField:'name', panelHeight:'auto'">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="query()">查询</a>
</div>
<%--为表格添加保存|编辑的对话框--%>
<div id="emp_dialog">
    <%--对话框中是一个form表单--%>
   <%-- <form id="editForm" method="post" style="padding: 20px 0px 0px 10px;">--%>
        <form id="editForm" method="post" style="padding:40px 0px 0px 10px;">
        <input type="hidden" name="id" id="empId">
            <table style="border-collapse: separate;border-spacing: 20px;">
        <tr>
            <td align="right">用户名</td>
            <td><input class="easyui-textbox" type="text" name="username" ></td><br>
        </tr>
        <tr>
            <td align="right">真实名字</td>
            <td><input class="easyui-textbox" type="text" name="realname"> </td><br>
        </tr>
        <tr>
            <td align="right">电话</td>
            <td><input class="easyui-textbox" type="text" name="tel"> </td><br>
        </tr>
        <tr>
            <td align="right">邮箱</td>
            <td><input class="easyui-textbox" type="text" name="email"> </td><br>
        </tr>
        <tr>
            <td align="right">入职日期</td>
            <td><input class="easyui-datebox" type="text" name="hiredate"> </td><br>
        </tr>

        <tr>
            <td align="right">超级管理员</td>
            <td><input class="easyui-combobox" type="text" name="admin"
                data-options="data:[{value:'1',text:'是'},{value:'0',text:'否'}],
                valueField:'value', textField:'text', panelHeight:'auto'">
            </td><br>
        </tr>
        <tr>
            <td align="right">部门</td>
            <td><input class="easyui-combobox" type="text" name="dept.id"
                data-options="url:'/department/queryDepts',valueField:'id', textField:'name', panelHeight:'auto'">
            </td><br>
        </tr>
        <tr>
            <td align="right">状态</td>
            <td><input class="easyui-combobox" type="text" name="state"
                data-options="data:[{value:'1',text:'在职'},{value:'0',text:'离职'}],
                valueField:'value', textField:'text', panelHeight:'auto'">
            </td><br>
        </tr>
        <tr>
            <td align="right">角色</td>
            <td><input class="easyui-combobox" type="text" id="roleIds"
                data-options="url:'/role/queryRoles',valueField:'id', textField:'name', panelHeight:'auto', multiple:true">
            </td><br>
        </tr>
        </table>
    </form>
</div>
<div id="bb">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" onclick="save()">保存</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" onclick="cancel()">取消</a>
</div>
</body>
</html>
